<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<head>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<title>万里金融系统-新闻详情</title>
	<link href="../../plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
	<!-- <link href="../../css/style.css" rel="stylesheet" type="text/css" /> -->
	<link href="../../css/css.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="../../js/jquery.min.js"></script>
	<script type="text/javascript" src="../../js/bootstrap.min.js"></script>
	<script type="text/javascript" src="../../js/base.js"></script>
	<script src="../../js/template.js"></script>
	<script src="../../js/bootstrap-paginator.js"></script>
	<script src="../../js/bootstrap-mypaginator.js"></script>
	<script>
		$(function () {
			setInterval(function () {

				var t = new Date();
				var ts = "当前时间：" + t.getFullYear() + "年" + (t.getMonth() + 1) + "月" + t.getDate() + "日 " + t.getHours() + ":" + t.getMinutes() + ":" + t.getSeconds() + "";
				$("#currentTime").html(ts);
			}, 400);

			var newsId = sessionStorage.getItem('newsid');

			$.ajax({
				url: commonurl + "/selectNewsById.news",
				type: "POST",
				data: {
					"newsId": newsId
				},
				dataType: "json",
				success: function (data) {
					if (data.success) {
						var obj = data.obj;
						var target = new Date(obj.createTime);
						var year = target.getFullYear();
						var month = target.getMonth()+1;
						var day = target.getDate();
						var hour = target.getHours();
						var minute = target.getMinutes();
						var second = target.getSeconds();
						obj.createTime = `${year}-${month}-${day} ${hour}:${minute}:${second}`;
						// console.log(obj);

						$("#newsContent").html(template("newsTemplate", obj));
					}
				}
			});
		})
	</script>
</head>

<body>
	<div class="wrap header oauto clear">
		<div class="fl" style="font-size: 20px;
		font-weight: bold;
		color: #fff;
		line-height: 40px;
		padding-left: 10px;">万里金融系统</div>
		<div class="fr">
			<a id="currentTime" href="#">

			</a>
		</div>
	</div>
	<div class="logo-nav">
		<div class="wrap oauto">
			<div class="clear">
			</div>
		</div>
	</div>
	<div class="menu">
		<ul class="clear">
			<li><a href="index.html">融资产品</a></li>
			<li><a href="news.html" class="cur">每日新闻</a></li>
		</ul>
	</div>

	<div class="wrap font16">首页 >> 每日新闻 >> 新闻详情</div>

	<div class="wrap panel panel-primary">
		<div class="panel-heading">
			<h3 class="panel-title">新闻详情</h3>
		</div>
		<div class="panel-body" id="newsContent">
			<script type="text/html" id="newsTemplate">
				<h3 class="h3">{{newTitle}}</h3>
				<img src="http://localhost:8080{{imageUrl}}" class="img-thumbnail" style="width:200px;height:150px;">
				<p class="lead">{{newContent}}</p>
				<p class="text-right" style="font-size:16px;">{{createTime}}</p>
			</script>
		</div>
	</div>
	<div class="wrap">
		<a class="btn btn-lg btn-primary" href="javascript:location.href='news.html'">
			返回每日新闻
			<span class="glyphicon"></span>
		</a>
	</div>

	<div class="footer">Copyright &copy;  版权所有 | <a href="./backend/login.html" target="_blank">后台管理入口</a></div>
</body>

</html>